<script>
import HelloWorld from './components/HelloWorld.vue'
import Tab from './components/Tab.vue'
import DivA from "./components/DivA.vue";
import SpanA from "./components/SpanA.vue";
export default{
  data(){
    return{
      msg:"123"
    }
  },
  components:{
    SpanA
  },
  methods:{
    onMsg(h,n){
      console.log('子组件触发父组件事件',h,n)
      this.msg='父组件被触发'
    }
  }
}
</script>

<template>
<div>
  <h2>vue组件1</h2>
  <DivA :msg="msg" @fMsg="onMsg"></DivA>
</div>
</template>

<style scoped>

</style>
